package com.cloudkinto.bo.workOrder.cost;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author long
 * @Description 工单费用项新增
 * @Date 2025/1/8 11:12
 */
@Data
public class WorkOrderCostAddBo {
    @ApiModelProperty("工单id")
    @NotNull(message = "工单id不可为空")
    private Long workOrderId;

    @ApiModelProperty("计费项列表")
    private List<WorkCostItem> workCostItemList;

    @Data
    public static class WorkCostItem {
        @ApiModelProperty("计费项名称")
        @NotEmpty(message = "计费项名称不可为空")
        private String itemName;

        @ApiModelProperty("计费变量")
        @NotEmpty(message = "计费变量不可为空")
        private String billingVariable;

        @ApiModelProperty("单价")
        @NotNull(message = "单价不可为空")
        private BigDecimal unitPrice;

        @ApiModelProperty("数量")
        @NotNull(message = "数量不可为空")
        private Integer qty;

        @ApiModelProperty("计费项费用")
        @NotNull(message = "计费项费用不可为空")
        private BigDecimal itemFee;

        @ApiModelProperty("币种")
        @NotEmpty(message = "币种不可为空")
        private String currencyCode;
    }
}
